﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace BaseLib.Localiztion
{
    public class LocalizedDisplayAttribute : DisplayNameAttribute
    {
        private string _displayKey;
        public LocalizedDisplayAttribute(string displayKey)
        {
            _displayKey = displayKey;
        }

        public override string DisplayName
        {
            get
            {
                return Translator.Translate(_displayKey);
            }
        }
    }
}
